const KoaRouter = require("@koa/router")
const { create } = require("../controller/file.controller")
const { handleAvatar } = require("../middleware/file.middleware")
const { authorVerify } = require("../middleware/login.middleware")

const fileRouter = new KoaRouter({ prefix: "/file" })

// file/avatar => 上传头像
fileRouter.post("/avatar", authorVerify, handleAvatar, create)

module.exports = fileRouter
